package com.fengmi.controller;

import com.fengmi.cart.Cart;
import com.fengmi.service.ICartService;
import com.fengmi.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 作者：铁蛋
 * 时间：2021/10/23 11:47
 * 描述：永无Bug
 */
@RestController
@RequestMapping("cart")
public class CartController {
    @Autowired
    private ICartService cartService;
    @RequestMapping("add")
    public ResultVO add (String  skuId, Integer buyNum){
        return  cartService.addCart(skuId,buyNum);
    }
    @RequestMapping("findCartList")
    public List<Cart> findCartList (){
            return  cartService.findCartList();
    }
}
